
IF NOT EXISTS (SELECT * FROM sysobjects (NOLOCK) WHERE id = OBJECT_ID('[dbo].[BosObtieneLogin]') AND OBJECTPROPERTY(id, 'IsProcedure') = 1)
	BEGIN 
    EXEC ('CREATE PROCEDURE [dbo].[BosObtieneLogin] as Select Getdate()')
	END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[BosObtieneLogin]       
@pnUsuario varchar(300)  
AS BEGIN          
SET NOCOUNT ON     


           
 SELECT   
     IdUsuario
     ,NombreUsuario
     ,Ususario
     ,Contrasena
     ,EsAdmin
 FROM   BosCatUsuario   (NOLOCK)    
    WHERE  Ususario = @pnUsuario
 
  
SET NOCOUNT OFF
END
GO






/*

   --Jobs
   EXEC InGeneraFactura
   exec InEnviaPorcentajeIncrementoAnual
   exec InEnviaCorreoFacturasVencidas
   
  
  
  backup database Inmobiliaria to disk = 'c:\Diego\Inmobiliaria.bak'
  restore database Inmobiliaria2 from disk='c:\Diego\Inmobiliaria.bak'
   with move 'Inmobiliaria' to 'c:\Diego\n1.mdf' ,
        move 'Inmobiliaria_log' to 'c:\Diego\l1.ldf' 

  
*/